%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[11pt,tikz,border=1]{standalone}

\begin{document}
\begin{tikzpicture}[
    tick/.style={font=\footnotesize}
  ]
  
  \draw (-5,0) -- (5,0) node [right] {Z};
  
  \foreach \x in {-4, -3, -2, -1, 0, 1, 2, 3, 4}
  \draw (\x, 0) -- (\x, -0.15) node[tick,below]{$\x$};
  
  %\draw (-5, 0) -- (-5, -0.1);
  \draw (5, 0) -- (5, -0.15);
  
  \draw (-5,-3) -- (-5,3);
  
  \foreach \y in {-1.0, -0.5, 0.0, 0.5, 1.0}
  \draw (-5, \y * 3) -- (-5-0.15, \y * 3) node[tick,left]{$\y$};
  
  \draw (0, 3) node[above] {tanh function};
  
  \draw[blue,thick,domain=-10:10,xscale=0.5,samples=101] plot (\x, {6 * (1 + tanh(\x/2))/2 - 3});
  
\end{tikzpicture} 
\end{document}
